<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        
$players = array();
$content = file_get_contents(
"http://www.nomaskeine.com/estadisticas/puntos/25/mejores/jugadores");
$doc = new DOMDocument();
libxml_use_internal_errors(true);
$doc->loadHTML($content);
$xpath = new DOMXPath($doc);
$row = $xpath->query('//table/tbody//tr');
 
foreach ($row as $r) {
    $col = $r->getElementsByTagName('td');
    $players[] = array( 
                "position" => $col->item(0)->nodeValue, 
                "name" => $col->item(1)->nodeValue, 
                "team" => $col->item(2)->nodeValue, 
                "points" => $col->item(3)->nodeValue,
                "price" => $col->item(4)->nodeValue, 
                "efficiency" => $col->item(5)->nodeValue
    ); 
}
 
echo '<pre>';
print_r($players);
echo '</pre>';
        ?>
        
    </body>
</html>
